<button id="btn">插入1mb数据</button>

<script>
const btn = document.getElementById('btn')
let i = 0
// ++i i++
btn.onclick = () => {
  localStorage.setItem(i++, 'a'.repeat(1024*1024-1))
}
</script>

